package com.waverider.promotion.biz.dao;

import java.util.List;
import java.util.Map;

import com.waverider.promotion.domain.OrderDO;
import com.waverider.promotion.domain.RebateModel;
import com.waverider.promotion.model.OrderQueryModel;

/**
 * 
 * @author sihai
 * 
 */
public interface OrderDAO {
	/**
	 * 
	 * @param order
	 */
	void insert(OrderDO order);

	/**
	 * 
	 * @param buyer
	 * @param promotion
	 * @return
	 */
	OrderDO queryByBuyerAndPromotion(Long buyer, Long promotion);

	/**
	 * 
	 * @param orderId
	 * @return
	 */
	OrderDO queryByOrderId(Long orderId);

	/**
	 * 
	 * @param queryModel
	 * @return
	 */
	List<OrderDO> query(OrderQueryModel queryModel);

	/**
	 * 
	 * @param queryModel
	 * @return
	 */
	Long count(OrderQueryModel queryModel);

	/**
	 * 
	 * @param order
	 * @return
	 */
	boolean update(OrderDO order);

	/**
	 * 
	 * @param id
	 * @return
	 */
	boolean delete(Long id);

	/**
	 * @param params
	 * @return
	 */
	List<RebateModel> getOrderByShopId(Map<String, Long> params);
}
